﻿using QDT.Core.Domain;
using QDT.Core.Members;
using QDT.Core.Orders;
using QDT.Core.Payments;

namespace QDT.Services.Orders
{
    public interface IOrderService {
        /// <summary>
        /// 创建一个充值订单
        /// </summary>
        /// <param name="user"></param>
        /// <param name="money"></param>
        /// <param name="paymentkey"></param>
        /// <param name="bank"></param>
        /// <returns></returns>
        ChargeOrder CreateChargeOrder(User user,decimal money,string paymentkey,string bank);

        /// <summary>
        /// 根据订单ID创建支付订单
        /// </summary>
        /// <param name="orderid"></param>
        /// <returns></returns>
        PaymentNotice CreatePaymentOrder(int orderid);

        /// <summary>
        /// 管理员处理收款
        /// </summary>
        /// <param name="admin"></param>
        /// <param name="order"></param>
        void AdminPay(AdminUser admin, ChargeOrder order);

        /// <summary>
        /// 删除订单
        /// </summary>
        /// <param name="id"></param>
        void DeleteOrder(int[] id);

        /// <summary>
        /// 永久删除订单
        /// </summary>
        /// <param name="id"></param>
        void ForeverDeleteOrder(int[] id);

        void RestoreOrder(int[] id);

        void PayFinished(object sender);
        void PayFaild(object sender);
    }
}
